package cn.stylefeng.guns.modular.business.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

@ApiModel(value="cn-stylefeng-guns-modular-business-dto-DeviceAddDto")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DeviceAddDto {


    /**
     * 厂家编号、品牌编号，方便搜索
     */
    @TableField(value = "device_brand_id")
    @NotNull(message = "品牌编号不能为空")
    @ApiModelProperty(value="品牌编号")
    private Integer deviceBrandId;

    /**
     * 设备品牌。如海康、新驰、宇叶
     */
    @TableField(value = "device_brand")
    @ApiModelProperty(value="品牌名称")
    private String deviceBrand;

    /**
     * 厂家出厂的设备序列号
     */
    @TableField(value = "device_sn")
    @NotBlank(message = "设备编号不能为空")
    @ApiModelProperty(value="设备编号")
    @Length(max = 64,message = "设备编号不能超过64位")
    private String deviceSn;

    /**
     * 设备类型，1是塔吊、2是升降机、3是吊钩可视化、4是AI服务器、5是监控摄像头，6是用电监测设备
     */
    @TableField(value = "device_type")
    @NotNull(message = "设备类型不能为空")
    @ApiModelProperty(value="设备类型")
    private Integer deviceType;

    /**
     * 最后在线时间
     */
    @TableField(value = "device_last_time")
    @ApiModelProperty(value="最后在线时间")
    private Integer deviceLastTime;

    /**
     * 0是未启用，1是启用
     */
    @TableField(value = "status")
    @ApiModelProperty(value="状态")
    private Integer status;

    /**
     * 备注
     */
    @TableField(value = "remarks")
    @ApiModelProperty(value="备注")
    private String remarks;




}
